package org.alis.ap.rpc.client.config;

import com.google.common.collect.Lists;
import lombok.Data;
import org.alis.ap.rpc.Peer;
import org.alis.ap.rpc.client.selector.RandomTransportSelector;
import org.alis.ap.rpc.client.selector.TransportSelector;
import org.alis.ap.rpc.codec.Decoder;
import org.alis.ap.rpc.codec.Encoder;
import org.alis.ap.rpc.codec.json.JSONDecoder;
import org.alis.ap.rpc.codec.json.JSONEncoder;
import org.alis.ap.rpc.transport.TransportClient;
import org.alis.ap.rpc.transport.http.ApTransportClient;

import java.util.List;

/**
 * ClientConfig desc:
 *
 * @author luochuan
 * @date 2020/10/21 14:15
 */
@Data
public class ClientConfig {

    private Class<? extends TransportClient> transportClient = ApTransportClient.class;

    private Class<? extends Encoder> encoder = JSONEncoder.class;

    private Class<? extends Decoder> decoder = JSONDecoder.class;

    private Class<? extends TransportSelector> selector = RandomTransportSelector.class;

    private int connectCount = 1;

    private List<Peer> serverList = Lists.newArrayList(new Peer("127.0.0.1",3000));


}
